package com.xing.ucenter.controller;


import com.xing.commonutils.R;
import com.xing.ucenter.service.MemberService;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/serviceUcenter/ucenter-member")
@CrossOrigin
@ApiModel("用户成员管理层")
public class UcenterMemberController {


    @Autowired
    private MemberService ucenterMemberService;


    /**
     * 根据时间，获取那天注册的人数
     *
     * @param day
     * @return
     */
    @GetMapping("countRegister/{day}")
    @ApiOperation("根据时间，获取那天注册的人数")
    public R countRegister(@PathVariable String day) {
        Integer count = ucenterMemberService.getCountRegister(day);
        return R.ok().data("countRegister", count);
    }
}
